<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>[Generic Component Framework v3] GCF::MapToObjectWatcher Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<!--link href="tabs.css" rel="stylesheet" type="text/css"-->
</head><body>
 <div id="wrapper">
    <div id="logo_box">
        <a class="img_link" href="https://github.com/pnudupa/gcf" target="_blank" ><img style="float:left;margin-left:10px;margin-top:5px;margin-bottom:5px;"src="header_gcf_logo.jpg" alt="GCF LOGO"/></a>
        <a class="img_link" href="https://www.vcreatelogic.com/" target="_blank" ><img style="float:right;margin-right:10px; margin-top: 30px;" src="header_vcl_logo.jpg" alt="VCL LOGO"/></a>
        <div style="clear:both"></div>
    </div>
    <div class="nav">
        <ul>
            <li class="selectedpage">
                <a class="a-home" href="index.html" >
                    <span>Home</span>
                </a>
            </li>
            <li>
                <a class="a-classes " href="classes.html">
                    <span>All Classes</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_modules.html">
                    <span>Modules</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_guides_and_videos.html">
                    <span>Guides & Videos</span>
                </a>
            </li>
            <li>
                <a class="a-home " href="gcf_tools_and_inbuilt_components.html">
                    <span>Tools & Components</span>
                </a>
            </li>
        </ul>
    </div>
    <div id="main-content">
        <div class="inside">
        <div>
<!-- Generated by Doxygen 1.8.16 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>GCF</b></li><li class="navelem"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html">MapToObjectWatcher</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_g_c_f_1_1_map_to_object_watcher-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">GCF::MapToObjectWatcher Class Reference<div class="ingroups"><a class="el" href="group__gcf__core.html">GCF Core Module</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>This watches over <a class="el" href="class_g_c_f_1_1_map_to_object.html" title="This class manages a map of &lt;T&gt;-QObject pairs. &lt;T&gt; is a template class.">MapToObject</a> to emit signals when the objects are inserted, removed or deleted from <a class="el" href="class_g_c_f_1_1_map_to_object.html" title="This class manages a map of &lt;T&gt;-QObject pairs. &lt;T&gt; is a template class.">GCF::MapToObject</a>.  
 <a href="class_g_c_f_1_1_map_to_object_watcher.html#details">More...</a></p>

<p><code>#include &lt;GCF3/MapToObject&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="signals"></a>
Signals</h2></td></tr>
<tr class="memitem:a17fe88d850175ab2b29960e7007f2eb9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#a17fe88d850175ab2b29960e7007f2eb9">objectInserted</a> (QObject *obj)</td></tr>
<tr class="separator:a17fe88d850175ab2b29960e7007f2eb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf7a6b32e35e89c9cd77473edde498b6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#adf7a6b32e35e89c9cd77473edde498b6">objectRemoved</a> (QObject *obj)</td></tr>
<tr class="separator:adf7a6b32e35e89c9cd77473edde498b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e9adc1705debe79ec4b2e248620ad61"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#a3e9adc1705debe79ec4b2e248620ad61">objectDeleted</a> (QObject *obj)</td></tr>
<tr class="separator:a3e9adc1705debe79ec4b2e248620ad61"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a34393ef2eb38ffa5bce7c7c3043aaf8a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#a34393ef2eb38ffa5bce7c7c3043aaf8a">MapToObjectWatcher</a> (QObject *parent=nullptr)</td></tr>
<tr class="separator:a34393ef2eb38ffa5bce7c7c3043aaf8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95da3d392bb7b545ad3169513caca007"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#a95da3d392bb7b545ad3169513caca007">~MapToObjectWatcher</a> ()</td></tr>
<tr class="separator:a95da3d392bb7b545ad3169513caca007"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64fb9ebfc0ce748d3c07b7c94669cb9b"><td class="memTemplParams" colspan="2">template&lt;class T &gt; </td></tr>
<tr class="memitem:a64fb9ebfc0ce748d3c07b7c94669cb9b"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#a64fb9ebfc0ce748d3c07b7c94669cb9b">watch</a> (<a class="el" href="class_g_c_f_1_1_map_to_object.html">MapToObject</a>&lt; T &gt; &amp;map)</td></tr>
<tr class="separator:a64fb9ebfc0ce748d3c07b7c94669cb9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7840c220715a27c063868774367ec6f6"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#a7840c220715a27c063868774367ec6f6">listenerType</a> () const</td></tr>
<tr class="separator:a7840c220715a27c063868774367ec6f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_g_c_f_1_1_map_to_object_event_listener')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_g_c_f_1_1_map_to_object_event_listener.html">GCF::MapToObjectEventListener</a></td></tr>
<tr class="memitem:a373bc255c0e29b30c761594a16b2896e inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_event_listener.html#a373bc255c0e29b30c761594a16b2896e">MapToObjectEventListener</a> ()</td></tr>
<tr class="separator:a373bc255c0e29b30c761594a16b2896e inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17af9f470c02af5d6f15ff64fb29ee36 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_event_listener.html#a17af9f470c02af5d6f15ff64fb29ee36">~MapToObjectEventListener</a> ()</td></tr>
<tr class="separator:a17af9f470c02af5d6f15ff64fb29ee36 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae90a48048818ba50784240e97f2848c8 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_event_listener.html#ae90a48048818ba50784240e97f2848c8">objectInserted</a> (QObject *object)</td></tr>
<tr class="separator:ae90a48048818ba50784240e97f2848c8 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58efaf21adcd2787ed3a7ddc73dd0915 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_event_listener.html#a58efaf21adcd2787ed3a7ddc73dd0915">objectRemoved</a> (QObject *object)</td></tr>
<tr class="separator:a58efaf21adcd2787ed3a7ddc73dd0915 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04c4026250bc7a80d4a8d744aa2966b2 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_g_c_f_1_1_map_to_object_event_listener.html#a04c4026250bc7a80d4a8d744aa2966b2">objectDeleted</a> (QObject *object)</td></tr>
<tr class="separator:a04c4026250bc7a80d4a8d744aa2966b2 inherit pub_methods_class_g_c_f_1_1_map_to_object_event_listener"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>You can set this to watch over a <a class="el" href="class_g_c_f_1_1_map_to_object.html">GCF::MapToObject</a> by using <a class="el" href="class_g_c_f_1_1_map_to_object_watcher.html#a64fb9ebfc0ce748d3c07b7c94669cb9b">GCF::MapToObjectWatcher::watch(MapToObject &amp;list)</a> method.</p>
<p>Only one watcher can watch over <a class="el" href="class_g_c_f_1_1_map_to_object.html">GCF::MapToObject</a> at a time.If there is already a watcher watching <a class="el" href="class_g_c_f_1_1_map_to_object.html" title="This class manages a map of &lt;T&gt;-QObject pairs. &lt;T&gt; is a template class.">MapToObject</a> when a new one is set, then it will be replaced with the new one. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a34393ef2eb38ffa5bce7c7c3043aaf8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34393ef2eb38ffa5bce7c7c3043aaf8a">&#9670;&nbsp;</a></span>MapToObjectWatcher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::MapToObjectWatcher::MapToObjectWatcher </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>parent</em> = <code>nullptr</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default constructor. </p>

</div>
</div>
<a id="a95da3d392bb7b545ad3169513caca007"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95da3d392bb7b545ad3169513caca007">&#9670;&nbsp;</a></span>~MapToObjectWatcher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">GCF::MapToObjectWatcher::~MapToObjectWatcher </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a64fb9ebfc0ce748d3c07b7c94669cb9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64fb9ebfc0ce748d3c07b7c94669cb9b">&#9670;&nbsp;</a></span>watch()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">GCF::MapToObjectWatcher::watch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_g_c_f_1_1_map_to_object.html">MapToObject</a>&lt; T &gt; &amp;&#160;</td>
          <td class="paramname"><em>map</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets the <a class="el" href="class_g_c_f_1_1_map_to_object.html">GCF::MapToObject</a> to watch. If there is already a watcher watching that <a class="el" href="class_g_c_f_1_1_map_to_object.html" title="This class manages a map of &lt;T&gt;-QObject pairs. &lt;T&gt; is a template class.">MapToObject</a>, then it will be replaced with this. </p>

</div>
</div>
<a id="a7840c220715a27c063868774367ec6f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7840c220715a27c063868774367ec6f6">&#9670;&nbsp;</a></span>listenerType()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QString GCF::MapToObjectWatcher::listenerType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the listener type. By default listener type is "GCF::MapToObjectEventListener". </p><dl class="section return"><dt>Returns</dt><dd>the current listener type </dd></dl>

<p>Reimplemented from <a class="el" href="class_g_c_f_1_1_map_to_object_event_listener.html#a529780c711008064d9ef3c68d594131f">GCF::MapToObjectEventListener</a>.</p>

</div>
</div>
<a id="a17fe88d850175ab2b29960e7007f2eb9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17fe88d850175ab2b29960e7007f2eb9">&#9670;&nbsp;</a></span>objectInserted</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::MapToObjectWatcher::objectInserted </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when a Value - <code>QObject</code> pointer pair is inserted as value to the <a class="el" href="class_g_c_f_1_1_map_to_object.html">GCF::MapToObject</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer inserted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="adf7a6b32e35e89c9cd77473edde498b6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adf7a6b32e35e89c9cd77473edde498b6">&#9670;&nbsp;</a></span>objectRemoved</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::MapToObjectWatcher::objectRemoved </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when a Value - <code>QObject</code> pointer pair is removed from the values of <a class="el" href="class_g_c_f_1_1_map_to_object.html">GCF::MapToObject</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer removed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a3e9adc1705debe79ec4b2e248620ad61"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e9adc1705debe79ec4b2e248620ad61">&#9670;&nbsp;</a></span>objectDeleted</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">GCF::MapToObjectWatcher::objectDeleted </td>
          <td>(</td>
          <td class="paramtype">QObject *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This signal will be emitted when <code>QObject</code> inside <a class="el" href="class_g_c_f_1_1_map_to_object.html">MapToObject</a> is deleted inside application. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td><code>QObject</code> pointer deleted. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
</div>
</div>
<div class="footer_content">
<table width="100%" class="footer">
<tr>
<td align="left" width="50%">Copyright &copy; 2013-2019,
 <a class="el" href="http://www.vcreatelogic.com" target="_black">VCreate Logic Private Limited</a></td>
<td align="right" width="50%"><a class="el" href="http://www.vcreatelogic.com/products/gcf" target="_black">GCF - Generic Component Framework</a></td>
</tr>
</table>
</div>
</div>
</body>
</html>
